Integrand size = 23, antiderivative size = 106 \[ \int \frac {\sin ^7(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\frac {a^3 \text {arctanh}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{b^{7/2} \sqrt {a+b} d}-\frac {\left (a^2-a b+b^2\right ) \cos (c+d x)}{b^3 d}-\frac {(a-2 b) \cos ^3(c+d x)}{3 b^2 d}-\frac {\cos ^5(c+d x)}{5 b d} \]
-(a^2-a*b+b^2)*cos(d*x+c)/b^3/d-1/3*(a-2*b)*cos(d*x+c)^3/b^2/d-1/5*cos(d*x +c)^5/b/d+a^3*arctanh(cos(d*x+c)*b^(1/2)/(a+b)^(1/2))/b^(7/2)/d/(a+b)^(1/2 )
Result contains complex when optimal does not.
Time = 1.27 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.70 \[ \int \frac {\sin ^7(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\frac {-240 a^3 \arctan \left (\frac {\sqrt {b}-i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )-240 a^3 \arctan \left (\frac {\sqrt {b}+i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )-2 \sqrt {-a-b} \sqrt {b} \cos (c+d x) \left (120 a^2-100 a b+89 b^2+4 (5 a-7 b) b \cos (2 (c+d x))+3 b^2 \cos (4 (c+d x))\right )}{240 \sqrt {-a-b} b^{7/2} d} \]
(-240*a^3*ArcTan[(Sqrt[b] - I*Sqrt[a]*Tan[(c + d*x)/2])/Sqrt[-a - b]] - 24 0*a^3*ArcTan[(Sqrt[b] + I*Sqrt[a]*Tan[(c + d*x)/2])/Sqrt[-a - b]] - 2*Sqrt [-a - b]*Sqrt[b]*Cos[c + d*x]*(120*a^2 - 100*a*b + 89*b^2 + 4*(5*a - 7*b)* b*Cos[2*(c + d*x)] + 3*b^2*Cos[4*(c + d*x)]))/(240*Sqrt[-a - b]*b^(7/2)*d)
Time = 0.30 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.93, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 3665, 300, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sin ^7(c+d x)}{a+b \sin ^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (c+d x)^7}{a+b \sin (c+d x)^2}dx\) |
\(\Big \downarrow \) 3665 |
\(\displaystyle -\frac {\int \frac {\left (1-\cos ^2(c+d x)\right )^3}{-b \cos ^2(c+d x)+a+b}d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 300 |
\(\displaystyle -\frac {\int \left (\frac {\cos ^4(c+d x)}{b}+\frac {(a-2 b) \cos ^2(c+d x)}{b^2}+\frac {a^2-b a+b^2}{b^3}-\frac {a^3}{b^3 \left (-b \cos ^2(c+d x)+a+b\right )}\right )d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {-\frac {a^3 \text {arctanh}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{b^{7/2} \sqrt {a+b}}+\frac {\left (a^2-a b+b^2\right ) \cos (c+d x)}{b^3}+\frac {(a-2 b) \cos ^3(c+d x)}{3 b^2}+\frac {\cos ^5(c+d x)}{5 b}}{d}\) |
-((-((a^3*ArcTanh[(Sqrt[b]*Cos[c + d*x])/Sqrt[a + b]])/(b^(7/2)*Sqrt[a + b ])) + ((a^2 - a*b + b^2)*Cos[c + d*x])/b^3 + ((a - 2*b)*Cos[c + d*x]^3)/(3 *b^2) + Cos[c + d*x]^5/(5*b))/d)
3.1.78.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Int [PolynomialDivide[(a + b*x^2)^p, (c + d*x^2)^(-q), x], x] /; FreeQ[{a, b, c , d}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && ILtQ[q, 0] && GeQ[p, -q]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^ (p_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]
Time = 1.32 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.04
method | result | size |
derivativedivides | \(\frac {-\frac {\frac {\left (\cos ^{5}\left (d x +c \right )\right ) b^{2}}{5}+\frac {a b \left (\cos ^{3}\left (d x +c \right )\right )}{3}-\frac {2 b^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{3}+\cos \left (d x +c \right ) a^{2}-a b \cos \left (d x +c \right )+b^{2} \cos \left (d x +c \right )}{b^{3}}+\frac {a^{3} \operatorname {arctanh}\left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{b^{3} \sqrt {\left (a +b \right ) b}}}{d}\) | \(110\) |
default | \(\frac {-\frac {\frac {\left (\cos ^{5}\left (d x +c \right )\right ) b^{2}}{5}+\frac {a b \left (\cos ^{3}\left (d x +c \right )\right )}{3}-\frac {2 b^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{3}+\cos \left (d x +c \right ) a^{2}-a b \cos \left (d x +c \right )+b^{2} \cos \left (d x +c \right )}{b^{3}}+\frac {a^{3} \operatorname {arctanh}\left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{b^{3} \sqrt {\left (a +b \right ) b}}}{d}\) | \(110\) |
risch | \(-\frac {{\mathrm e}^{i \left (d x +c \right )} a^{2}}{2 b^{3} d}+\frac {3 a \,{\mathrm e}^{i \left (d x +c \right )}}{8 d \,b^{2}}-\frac {5 \,{\mathrm e}^{i \left (d x +c \right )}}{16 b d}-\frac {{\mathrm e}^{-i \left (d x +c \right )} a^{2}}{2 b^{3} d}+\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )} a}{8 b^{2} d}-\frac {5 \,{\mathrm e}^{-i \left (d x +c \right )}}{16 b d}-\frac {i a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{2 \sqrt {-a b -b^{2}}\, d \,b^{3}}+\frac {i a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{2 \sqrt {-a b -b^{2}}\, d \,b^{3}}-\frac {\cos \left (5 d x +5 c \right )}{80 b d}-\frac {\cos \left (3 d x +3 c \right ) a}{12 d \,b^{2}}+\frac {5 \cos \left (3 d x +3 c \right )}{48 d b}\) | \(290\) |
1/d*(-1/b^3*(1/5*cos(d*x+c)^5*b^2+1/3*a*b*cos(d*x+c)^3-2/3*b^2*cos(d*x+c)^ 3+cos(d*x+c)*a^2-a*b*cos(d*x+c)+b^2*cos(d*x+c))+a^3/b^3/((a+b)*b)^(1/2)*ar ctanh(b*cos(d*x+c)/((a+b)*b)^(1/2)))
Time = 0.30 (sec) , antiderivative size = 272, normalized size of antiderivative = 2.57 \[ \int \frac {\sin ^7(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\left [-\frac {6 \, {\left (a b^{3} + b^{4}\right )} \cos \left (d x + c\right )^{5} - 15 \, \sqrt {a b + b^{2}} a^{3} \log \left (\frac {b \cos \left (d x + c\right )^{2} + 2 \, \sqrt {a b + b^{2}} \cos \left (d x + c\right ) + a + b}{b \cos \left (d x + c\right )^{2} - a - b}\right ) + 10 \, {\left (a^{2} b^{2} - a b^{3} - 2 \, b^{4}\right )} \cos \left (d x + c\right )^{3} + 30 \, {\left (a^{3} b + b^{4}\right )} \cos \left (d x + c\right )}{30 \, {\left (a b^{4} + b^{5}\right )} d}, -\frac {3 \, {\left (a b^{3} + b^{4}\right )} \cos \left (d x + c\right )^{5} + 15 \, \sqrt {-a b - b^{2}} a^{3} \arctan \left (\frac {\sqrt {-a b - b^{2}} \cos \left (d x + c\right )}{a + b}\right ) + 5 \, {\left (a^{2} b^{2} - a b^{3} - 2 \, b^{4}\right )} \cos \left (d x + c\right )^{3} + 15 \, {\left (a^{3} b + b^{4}\right )} \cos \left (d x + c\right )}{15 \, {\left (a b^{4} + b^{5}\right )} d}\right ] \]
[-1/30*(6*(a*b^3 + b^4)*cos(d*x + c)^5 - 15*sqrt(a*b + b^2)*a^3*log((b*cos (d*x + c)^2 + 2*sqrt(a*b + b^2)*cos(d*x + c) + a + b)/(b*cos(d*x + c)^2 - a - b)) + 10*(a^2*b^2 - a*b^3 - 2*b^4)*cos(d*x + c)^3 + 30*(a^3*b + b^4)*c os(d*x + c))/((a*b^4 + b^5)*d), -1/15*(3*(a*b^3 + b^4)*cos(d*x + c)^5 + 15 *sqrt(-a*b - b^2)*a^3*arctan(sqrt(-a*b - b^2)*cos(d*x + c)/(a + b)) + 5*(a ^2*b^2 - a*b^3 - 2*b^4)*cos(d*x + c)^3 + 15*(a^3*b + b^4)*cos(d*x + c))/(( a*b^4 + b^5)*d)]
Timed out. \[ \int \frac {\sin ^7(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\text {Timed out} \]
Time = 0.37 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.09 \[ \int \frac {\sin ^7(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\frac {15 \, a^{3} \log \left (\frac {b \cos \left (d x + c\right ) - \sqrt {{\left (a + b\right )} b}}{b \cos \left (d x + c\right ) + \sqrt {{\left (a + b\right )} b}}\right )}{\sqrt {{\left (a + b\right )} b} b^{3}} + \frac {2 \, {\left (3 \, b^{2} \cos \left (d x + c\right )^{5} + 5 \, {\left (a b - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{3} + 15 \, {\left (a^{2} - a b + b^{2}\right )} \cos \left (d x + c\right )\right )}}{b^{3}}}{30 \, d} \]
-1/30*(15*a^3*log((b*cos(d*x + c) - sqrt((a + b)*b))/(b*cos(d*x + c) + sqr t((a + b)*b)))/(sqrt((a + b)*b)*b^3) + 2*(3*b^2*cos(d*x + c)^5 + 5*(a*b - 2*b^2)*cos(d*x + c)^3 + 15*(a^2 - a*b + b^2)*cos(d*x + c))/b^3)/d
Leaf count of result is larger than twice the leaf count of optimal. 332 vs. \(2 (94) = 188\).
Time = 0.43 (sec) , antiderivative size = 332, normalized size of antiderivative = 3.13 \[ \int \frac {\sin ^7(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\frac {15 \, a^{3} \arctan \left (\frac {b \cos \left (d x + c\right ) + a + b}{\sqrt {-a b - b^{2}} \cos \left (d x + c\right ) + \sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}} b^{3}} - \frac {2 \, {\left (15 \, a^{2} - 10 \, a b + 8 \, b^{2} - \frac {60 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {50 \, a b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {40 \, b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {90 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {70 \, a b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {80 \, b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {60 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {30 \, a b {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {15 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}\right )}}{b^{3} {\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1\right )}^{5}}}{15 \, d} \]
-1/15*(15*a^3*arctan((b*cos(d*x + c) + a + b)/(sqrt(-a*b - b^2)*cos(d*x + c) + sqrt(-a*b - b^2)))/(sqrt(-a*b - b^2)*b^3) - 2*(15*a^2 - 10*a*b + 8*b^ 2 - 60*a^2*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 50*a*b*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 40*b^2*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 90* a^2*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 - 70*a*b*(cos(d*x + c) - 1)^ 2/(cos(d*x + c) + 1)^2 + 80*b^2*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 - 60*a^2*(cos(d*x + c) - 1)^3/(cos(d*x + c) + 1)^3 + 30*a*b*(cos(d*x + c) - 1)^3/(cos(d*x + c) + 1)^3 + 15*a^2*(cos(d*x + c) - 1)^4/(cos(d*x + c) + 1)^4)/(b^3*((cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1)^5))/d
Time = 0.17 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.06 \[ \int \frac {\sin ^7(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\frac {a^3\,\mathrm {atanh}\left (\frac {\sqrt {b}\,\cos \left (c+d\,x\right )}{\sqrt {a+b}}\right )}{b^{7/2}\,d\,\sqrt {a+b}}-\frac {{\cos \left (c+d\,x\right )}^5}{5\,b\,d}-\frac {{\cos \left (c+d\,x\right )}^3\,\left (\frac {a+b}{3\,b^2}-\frac {1}{b}\right )}{d}-\frac {\cos \left (c+d\,x\right )\,\left (\frac {3}{b}+\frac {\left (a+b\right )\,\left (\frac {a+b}{b^2}-\frac {3}{b}\right )}{b}\right )}{d} \]